package com.kaiji.dao.impl;

import com.kaiji.dao.UserDao;
import com.kaiji.entity.UserEntity;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class UserDaoImpl extends BaseDaoImpl implements UserDao {


    public void save(UserEntity userEntity) {
        getSession().save(userEntity);
    }

    public List<UserEntity> getList() {
        String hql = "FROM UserEntity";
        return getSession().createQuery(hql).list();
    }
}
